<?php

declare(strict_types=1);

namespace App\VO\SelectCity;

use App\VO\Interfaces\IVOListItem;

class VOListItem implements IVOListItem
{
    public $id       = 0;
    public $areaname = '';

    public function __construct($data)
    {
        $this->id       = $this->setId($data);
        $this->areaname = $this->setName($data);
    }

    private function setId($data)
    {
        return $data['id'] ?? 0;
    }

    private function setName($data)
    {
        return $data['areaname'] ?? '';
    }
}
